79a10fe7a031d0258060787aef834ae47fbfdc2d,example/src/main/java/com/mbientlab/metawear/example/MainActivity.java,MainActivity,passthroughMe,#View#,592

Before Change


                                    Log.i("test", String.format("Upper threshold crossed: %.3f", msg.getData(Float.class)));
                                }
                            })
                        .branch().process(new Threshold(28.f, Threshold.Mode.ABSOLUTE))
                            .subscribe(new DataSignal.MessageProcessor() {
                                @Override
                                public void process(Message msg) {

After Change


    public void passthroughMe(View v) {
        final Switch mySwitch= (Switch) v;
        if (mySwitch.isChecked()) {
            if (!passthroughTempSetup) {
                mwBoard.routeData().fromTemperature()
                        .process("pt", new Passthrough(Passthrough.Mode.COUNT, (short) 8))
                        .subscribe("passthrough_temp")
                        .split()
                            .branch().process(new Delta(Delta.Mode.DIFFERENTIAL, 2.f)).subscribe("differential_temp")
                            .branch().process(new Threshold(30.f, Threshold.Mode.ABSOLUTE)).subscribe("upper_ths_temp")
                            .branch().process(new Threshold(28.f, Threshold.Mode.ABSOLUTE)).subscribe("lower_ths_temp")
                        .end()